package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.GenericData;
import com.cskaoyan.bean.param.BaseParam;
import com.cskaoyan.bean.po.MarketComment;
import com.cskaoyan.bean.wx.comment.WxCommentCountVo;
import com.cskaoyan.bean.wx.comment.WxCommentListVo;
import com.cskaoyan.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("wx/comment")
public class WxCommentController {

    @Autowired
    CommentService commentService;


    @GetMapping("count")
    public BaseRespVo list(Integer type,Integer valueId) {
        WxCommentCountVo wxCommentCountVo = commentService.queryCount(type, valueId);
        return BaseRespVo.ok(wxCommentCountVo);
    }
    @GetMapping("list")
    public BaseRespVo list(Integer type,Integer valueId,Integer limit,Integer page,Integer showType) {
        WxCommentListVo wxCommentListVo = commentService.queryList(type, valueId,limit,page,showType);

        return BaseRespVo.ok(wxCommentListVo);
    }






}
